class UserTagModel {
  String? id;
  String? owPage;
  String? name;
  String? url;
  String? code;
  bool? state;
  List<UserTagModel>? children;

  UserTagModel(
      {this.id,
      this.owPage,
      this.name,
      this.url,
      this.code,
      this.state,
      this.children});

  UserTagModel.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    owPage = json['owPage'];
    name = json['name'];
    url = json['url'];
    code = json['code'];
    state = json['state'];
    if (json['children'] != null) {
      children = <UserTagModel>[];
      json['children'].forEach((v) {
        children!.add(new UserTagModel.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['owPage'] = this.owPage;
    data['name'] = this.name;
    data['url'] = this.url;
    data['code'] = this.code;
    data['state'] = this.state;
    if (this.children != null) {
      data['children'] = this.children!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}
